#set($title = "$display.alt($!domain.domain,'传奇私服')")
#includeJs(["ueditor/ueditor.config","ueditor/ueditor.all.min","ueditor/ueditor.parse"])
<div id="acticle">
    <form action="/admin/acticles/add" method="post">
        <input type="hidden" name="id" value="$acticle.id"/>
        <table class="footable">
            <tr>
                <td style="width:10%">
                    标题
                </td>
                <td style="width:70%">
                    <input type="text" name="title" style="width:70%" value="$!acticle.title"/>
                </td>
            </tr>
            <tr>
                <td>
                    内容
                </td>
                <td style="height:700px">
                    <script type="text/plain" id="myEditor" name="content">
                        $!acticle.content
                    </script>
                </td>
            </tr>
            <tr>
                <td>
                    删除
                </td>
                <td>
                    <input type="button" value="删除" id="delete"/>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="submit" value="提交"/>
                </td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">
    
    $(function(){
        var options = {
            initialFrameWidth: 860,
            initialFrameHeight: 420,
            focus: true
        };
        
        var editor = new UE.ui.Editor();
        //1.2.4以后可以使用一下代码实例化编辑器
        UE.getEditor('myEditor', options);
        $("#delete").click(function(){
			window.location.href="/admin/acticles/$acticle.id/delete";
		});
    });
</script>
